import Vue from 'vue'
import Router from 'vue-router'
//import HelloWorld from '@/components/HelloWorld'
import Users from '../views/Users.vue'
import ElementUI from 'element-ui'
import Orders from '../views/Orders.vue'
import Notices from '../views/Notices.vue'
import App from '@/App'
import Index from '../views/index.vue'
import VueRouter from 'vue-router'
import AddUser from '../views/AddUser.vue'
import AddNotice from '../views/AddNotice.vue'
import UpdateNotice from '../views/UpdateNotice.vue'
import Login from '../views/Login.vue'
import Total from '@/views/Total.vue'
Vue.use(Router)
Vue.use(ElementUI)

export default new Router({
  routes: [
     {
       path:'/',
       name:'登录',
       show:false,
       component:Login,
       redirect:'/login',
       children:[
         {
           path:'/login',
           name:'登录界面',
           show:false,
           component:Login
         }
       ]
     },
   
    {
      path:'/',
      name:"用户管理",
      show:true,
      component:Index,
      redirect:"/users",
      children:[
         {
          path:"/users",
          name:"用户界面",
          show:true,
          component:Users
         },
         {
          path:"/addUser",
          name:"添加用户",
          show:true,
          component:AddUser
         },
      

      ]
    },
    {
      path:"/navigation",
      name:"订单管理",
      show:true,
      component:Index,
      children:[
        {
          path:"/orders",
          name:"订单界面",
          show:true,
          component:Orders
        },
      ]
    },
    {
      path:"/navigation2",
      name:"公告管理",
      show:true,
      component:Index,
      children:[
        {
          path:"/notices",
          name:"公告界面",
          show:true,
          component:Notices
        },
        {
          path:"/updateNotice",
          name:"修改公告",
          show:true,
          component:UpdateNotice
        },
        {
          path:"/addNotice",
          name:"添加公告",
          show:true,
          component:AddNotice
        },
      ]
    },
    {
      path:"/navigation3",
      name:"统计管理",
      show:true,
      component:Index,
      children:[
        {
          path:"/total",
          name:"统计页面",
          show:true,
          component:Total
        },
      ]
    },
   
   
    
  ]
})
